package com.ouyangtao.dao.impl;

import com.ouyangtao.dao.ITop10CategoryDAO;
import com.ouyangtao.domain.Top10Category;
import com.ouyangtao.jdbc.JDBCHelper;

public class Top10CategoryDAOImpl implements ITop10CategoryDAO {
    @Override
    public void insert(Top10Category top10Category) {
        String sql = "insert into top10_category values(?,?,?,?,?)";

        Object[] params = new Object[]{top10Category.getTaskId(),
                top10Category.getCategoryId(),
                top10Category.getClickCount(),
                top10Category.getOrderCount(),
                top10Category.getPayCount()};

        JDBCHelper jdbcHelper = JDBCHelper.getInstance();
        jdbcHelper.executeUpdate(sql, params);
    }
}
